
# Application
add_executable(off_screen
    main.cpp
    CalculationApp.h
    CalculationApp.cpp)

target_link_libraries(off_screen PRIVATE Selah)

set_target_properties(off_screen PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SELAH_RUNTIME_OUTPUT_DIRECTORY})

# Create a Falcor application and link the main Falcor library.
# function(add_falcor_executable target)
#     add_executable(${target})

#     target_link_libraries(${target} PRIVATE Falcor)

#     set_target_properties(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${FALCOR_RUNTIME_OUTPUT_DIRECTORY})

#     set_target_properties(${target} PROPERTIES VS_DEBUGGER_ENVIRONMENT "FALCOR_DEVMODE=1")
# endfunction()

target_compile_definitions(off_screen
# PRIVATE
#     STB_IMAGE_STATIC
PUBLIC
    $<$<CONFIG:Release>:NDEBUG>
    $<$<CONFIG:Debug>:_DEBUG>

    # dx12 debug layer
    $<$<CONFIG:Debug>:DX12_ENABLE_DEBUG_LAYER>
)

add_custom_command(
  TARGET off_screen
  POST_BUILD
  COMMAND ${CMAKE_COMMAND} -E copy_directory
    "${CMAKE_CURRENT_SOURCE_DIR}/Shaders"
    "$<TARGET_FILE_DIR:off_screen>/Shaders"
  COMMENT "Copying Shaders folder to output directory"
)